<?php

namespace app\admin\model\enterprise;

use app\api\model\v1\EnterpriseCategory;
use app\api\model\v1\User;
use think\Model;


class Job extends Model
{

    

    

    // 表名
    protected $name = 'enterprise_job';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];


    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function category()
    {
        return $this->belongsTo(EnterpriseCategory::class, 'enterprise_category_id', 'id');
    }





}
